Auto merge of #3000 - matklad:error-format, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 6 Oct 2016 21:03:22 +0000 (14:03 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Oct 2016 21:03:22 +0000 (14:03 -0700)
commit08738934e068583097253ff520ddef9fbf945c13
tree2c664df13b0139c932bef370f476867d6a8133ff
parentd3bad1ab29efae414e9b4c24534b2d02b3a59782
parentb9ec2b11ad98167ae9546155b2efda7b5cf34ac4
Auto merge of #3000 - matklad:error-format, r=alexcrichton

Add --message-format flag.

Closes #2982

This adds a `--message-format` flag with values `human` or `json-v1` to commands that may trigger compilation.

After the discussion in the issue I am no longer sure that this is a way to go:

* Looks like it buys nothing compared to `RUST_FLAGS` approach: a flag is more useful on the command line, but from the tool point of view there should be no significant differences between a flag and an environmental variable.

* Looks like we really want to wrap compiler's messages into our own json to tie them to particular compilation.
src/cargo/ops/cargo_rustc/mod.rs